package com.xgxf.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xgxf.server.pojo.ParameterDetails;
import com.xgxf.server.common.BaseQuery;
import com.xgxf.server.pojo.StandardValues;
import com.xgxf.server.pojo.ParameterDetailsQuery;
import com.xgxf.server.pojo.UserOperationLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;


@Mapper
public interface ParameterDetailsMapper extends BaseMapper<ParameterDetails> {

    /**
     * 分页获取文件列表
     * @param page 分页信息
     * @param query 查询条件
     * @return 查询结果
     */
    Page<ParameterDetails> getList(IPage<ParameterDetails> page, BaseQuery query);

    String getTotal(BaseQuery query);

    /**
     * 删除某一条记录
     */
    boolean  deleteId(String type);

    boolean  updateForkLiftById(@Param("params") StandardValues params);

    boolean  insertForkLiftOnStandardLimits(@Param("params") StandardValues params);

    boolean  insertForkLiftONPINType(@Param("params") StandardValues params);

    boolean  insertForkLiftOnTypeDefine(@Param("params") StandardValues params);

    // 获取整个列表的标准值
    Page<ParameterDetails> getTypeDetails(@Param("page") IPage<ParameterDetails> page, @Param("query") ParameterDetailsQuery query);


    // 获取具体型号的标准值
    StandardValues getStandardValues(@Param("type") String scissorType);

    ArrayList<String> getParameterTypeList();

    boolean insertUserOperationLog(@Param("params") UserOperationLog params);


}
